home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / pvm34b3.zip / pvm34b3 / pvm3 / lib / xpvm < prev   
Text File  |  1997-07-22  |  1KB  |  53 lines

  1. #!/bin/sh
  2. #
  3. #    $Id: xpvm,v 1.1 1996/09/23 21:15:50 pvmsrc Exp $
  4. #
  5. #    Start XPVM.
  6. #    If PVM_ROOT is not set in environment,
  7. #        we try to guess it by combining the working directory with argv[0],
  8. #        otherwise it defaults to ~/pvm3.
  9. #    If PVM_ARCH is not set,
  10. #        we get it by execing $PVMROOT/lib/pvmgetarch.
  11. #    If XPVM_ROOT is not set,
  12. #        set it to $PVM_ROOT/xpvm
  13. #
  14. #    11 May 1995  Manchek, from Convex version
  15. #
  16.  
  17. case "x$PVM_ROOT" in x )
  18.     case "$0" in
  19.     /*) PVM_ROOT="$0" ;;
  20.     *) PVM_ROOT=`pwd`/"$0" ;;
  21.     esac
  22.     PVM_ROOT=`echo "$PVM_ROOT" | sed -e 's/\/lib\/xpvm//'`
  23.     if [ -d $PVM_ROOT ]; then
  24.         export PVM_ROOT
  25.     else
  26.         if [ -d $HOME/pvm3 ]; then
  27.             PVM_ROOT=$HOME/pvm3
  28.             export PVM_ROOT
  29.         else
  30.             echo xpvm: PVM_ROOT not defined >&2
  31.             exit 1
  32.         fi
  33.     fi
  34. ;; esac
  35.  
  36. case "x$PVM_ARCH" in x | xUNKNOWN )
  37.     PVM_ARCH="`$PVM_ROOT/lib/pvmgetarch`"
  38.     case "x$PVM_ARCH" in x )
  39.         echo xpvm: can\'t set arch >&2
  40.         exit 1
  41.     ;; esac
  42.     export PVM_ARCH
  43. ;; esac
  44.  
  45. case "x$XPVM_ROOT" in x )
  46.     XPVM_ROOT=$PVM_ROOT/xpvm
  47.     export XPVM_ROOT
  48. ;; esac
  49.  
  50. exec $XPVM_ROOT/src/$PVM_ARCH/xpvm $@
  51. exit 1
  52.  
  53.